using System;
using System.Collections.Generic;
namespace CStock
{
	/// <summary>
	/// Summary description for OptimizationResult.
	/// </summary>
	public class OptimizationResult : IOptimizationResult
	{

		private System.Collections.ArrayList thresholdCollection;
		private double performancePerYearAverage;
		private double performancePerYear_Relative;
        private double performanceRelative;
        private double performance;
        
        private IList <double> performancePerYearList;

		public OptimizationResult()
		{
			thresholdCollection = new System.Collections.ArrayList();
            performancePerYearList = new List<double>();

		}
		//[System.Xml.Serialization.XmlElementAttribute(Form=System.Xml.Serialization.XmlForm.Unqualified, IsNullable=false)]
		public double[] Thresholds
		{
			get
			{
				return (double[])thresholdCollection.ToArray(typeof(double));
			}
			set // provide empty setter - otherwise this won't be XML serialized
			{

			}
		}
        public double[] PerformancePerYear
        {
            get
            {
                List<double> ff = performancePerYearList as List<double>;
                return (double[])ff.ToArray();
            }
            set // provide empty setter - otherwise this won't be XML serialized
            {

            }
        }
        [System.Xml.Serialization.XmlIgnoreAttribute()]
        public IList<double> PerformancePerYearList
        {
            get
            {
                return this.performancePerYearList;
            }
            set
            {
                this.performancePerYearList = value;
            }
        }
		[System.Xml.Serialization.XmlIgnoreAttribute()]
		public System.Collections.ArrayList ThresholdCollection
		{
			get
			{
				return this.thresholdCollection;
			}
			set
			{
				this.thresholdCollection = value;
			}
		}
		public double Performance
		{
			get
			{
				return this.performance;
			}
			set
			{
				this.performance = value;
			}
		}
		public double PerformanceRelative
		{
			get
			{
				return this.performanceRelative;
			}
			set
			{
				this.performanceRelative = value;
			}
		}
        public double PerformancePerYearAverage
        {
            get
            {
                return this.performancePerYearAverage;
            }
            set
            {
                this.performancePerYearAverage = value;
            }
        }
        public double PerformancePerYear_Relative
        {
            get
            {
                return this.performancePerYear_Relative;
            }
            set
            {
                this.performancePerYear_Relative = value;
            }
        }
		
	}
}
